<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMembersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('members', function (Blueprint $table) {
            $table->increments('id');

            $table->string('user', 60)->unique();

            $table->string('email', 60)->unique();

            $table->string('password', 60);

            // 用户类别
            $table->tinyInteger('class');

            // 用户状态
            $table->tinyInteger('status')->default(1);

            // 客户端登录验证 TOKEN
            $table->string('client_token', 100)->nullable()->unique();

            $table->rememberToken();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('members');
    }
}
